//#define _CRT_SECURE_NO_WARNINGS 1
//
//#include <iostream>
//using namespace std;
//int dayTab[2][13] = {
//    {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
//    {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
//};
//
//bool IsLeapYear(int year) {
//    return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
//}
//int main() {
//    int m = 1;
//    int year = 1992, month = 11, day = 3;
//    int number = 100;
//    int row = IsLeapYear(year);
//    number += day;
//    while (number > dayTab[row][month]) {
//        number -= dayTab[row][month];
//        month++;
//        if (month == 13)
//        {
//            month = 1;
//            year--;
//            row = IsLeapYear(year);
//        }
//    }
//    day = number;
//    printf("%04d-%02d-%02d\n", year, month, day);
//    return 0;
//}
//
